package controllers

import (
	beego "github.com/beego/beego/v2/server/web"
	"registration/models"
)

type PeopleMainController struct {
	beego.Controller
}

func (c *PeopleMainController) List2() {
	var peoples []models.People
	models.DB.Find(&peoples)
	c.Data["json"] = map[string]interface{}{
		"code": 200,
		"mes":  "展示成功",
		"data": peoples,
	}
	c.ServeJSON()
	return
}
